package com.newly.common.base.entity.sys.menu.vo;

import com.newly.common.base.entity.valid.Insert;
import com.newly.common.base.entity.valid.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @program: newly-parent
 * @remark: 菜单渲染规则, 创建和修改菜单时会使用到
 * @author: guan
 * @create: 2022-01-09 14:23
 */
@Data
public class MenuRenderRuleVo {
    /**
     * 菜单id
     */
    @NotNull(message = "id can't be empty", groups = Update.class)
    @ApiModelProperty(value = "菜单id")
    private boolean id;

    /**
     * 授权标识
     */
    @ApiModelProperty("授权标识")
    private boolean auth;

    /**
     * 菜单名称
     */
    @NotBlank(message = "name can't be empty", groups = Insert.class)
    @ApiModelProperty(value = "菜单名称")
    private boolean name;

    /**
     * 菜单类型，-1系统内部调用（不需要渲染的）,0目录，1菜单，2按钮
     */
    @ApiModelProperty(value = "菜单类型，-1系统内部调用（不需要渲染的）,0目录，1菜单，2按钮")
    private boolean type;

    /**
     * 父菜单id
     */
    @ApiModelProperty(value = "父菜单id")
    private boolean parentId;

    /**
     * 排序，值越大排序越前
     */
    @ApiModelProperty(value = "排序，值越大排序越前")
    private boolean sort;

    /**
     * 服务器uri，请求路劲
     */
    @ApiModelProperty(value = "服务器uri，请求路劲")
    private boolean serverUri;

    /**
     * 客户端uri,可用作于路由
     */
    @ApiModelProperty(value = "客户端uri,可用作于路由")
    private boolean clientUri;

    /**
     * 客户端路劲，可用作于组件的路劲
     */
    @ApiModelProperty(value = "客户端路劲，可用作于组件的路劲")
    private boolean clientPath;

    /**
     * 接口能力
     */
    @ApiModelProperty(value = "接口能力")
    private boolean ability;

    /**
     * 是否放行，0校验，1放行
     */
    @ApiModelProperty(value = "是否放行，0校验，1放行")
    private boolean access;

    /**
     * 是否开启，0关闭，1开启，默认值开启
     */
    @ApiModelProperty(value = "是否开启，0关闭，1开启，默认值开启")
    private boolean enable;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private boolean remark;

    /**
     * 图标
     */
    @ApiModelProperty("图标")
    private boolean icon;

    /**
     * 操作类型
     */
    @ApiModelProperty("操作类型")
    private boolean operation;

    private boolean apiPerm;

}
